<?php

use think\facade\Route;
//解决跨域问题
header('Content-Type: *');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE');//设置允许访问的协议
header('Access-Control-Allow-Credentials: true'); // 设置是否允许发送 cookies
header('Access-Control-Allow-Headers: *');

Route::group('index', function () {
    Route::get('index', 'openapi/IndexController/index');
});


//当路由规则都不匹配的话，会路由到`miss`
Route::miss(function () {
    return show(10000);
});